<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
</head>

<body>
    <div id="app">
        <div id="demo" title="hello" v-bind:data-index="index"></div>

        <!-- 原生DOM属性 -->
        <div class="one"></div>
        <!-- v-bind 动态绑定 => 属性值 变量 -->
        <!-- 绑定单个数据 v-bind:参数="指令值" -->
        <div :class="one"></div>
        <div :class="'one'+1"></div>

        <!-- v-bind 动态绑定 -->
        <!-- 同时绑定多个属性 v-bind="指令值(对象)" -->
        <div class="one" id="demo" title="hello" data-id="0" ASD="ASD"></div>
        <div v-bind="obj"></div>
    </div>
</body>
<script>
    // v-xxx  Vue中以v-开头的特殊属性

    // 用法   指令值的值一般是一个javascript表达式(变量和常量(100 'hello' true)组成的式子)
    // v-指令名="指令值"     v-html='xxx'
    // v-指令名:参数="指令值"     v-on:click='xxx'  v-bind:class='xxx'
    // v-指令名:参数.修饰符="指令值"     v-on:click.stop='xxx'  v-bind:class='xxx'

    var vm = new Vue({
        el: "#app",
        data: {
            index: 0,
            one: "one",
            obj: {
                id: "demo",
                class: "one",
                title: "hello",
                "data-id": 0,
            }
        }
    })





</script>

</html>